﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace TenderSampleApp.Models
{
    public class VATModel
    {
        public int ID { get; set; }
         [Display(Name = "Код за ЄДРПОУ")]
        public string Code { get; set; }
              [Display(Name = "Індекс")]
        public string PostIndex { get; set; }
              [Display(Name = "Область")]
        public string Region { get; set; }
              [Display(Name = "Район")]
        public string District { get; set; }
              [Display(Name = "Місто")]
        public string City { get; set; }
              [Display(Name = "Вулиця")]
        public string Street { get; set; }
              [Display(Name = "Будинок")]
        public string Build { get; set; }
              [Display(Name = "Квартира")]
        public int? Apartment { get; set; }
              [Display(Name = "Назва")]
        public string Name { get; set; }
              [Display(Name = "Телефон")]
        public string PhoneNumber { get; set; }
              [Display(Name = "Код галузі")]
        public string BranchCode { get; set; }
              [Display(Name = "Ф.І.О. менеджера")]
        public string ManagerFIO { get; set; }
              [Display(Name = "Сумма власних активів")]
        public double? TotalAssets { get; set; }
        public string FullAddressDBF { get; set; }
        public string FullAddress
        {
            get
            {
                string fulladdress = "";
                fulladdress += Region + " обл.";
                fulladdress += ", район " + District;
                fulladdress += ", м. " + City;
                fulladdress += (Street == "-") ? "" : ", вул. " + Street;
                fulladdress += (String.IsNullOrEmpty(Build)) ? "" : " " + Build;
                fulladdress += (String.IsNullOrEmpty(Apartment.ToString())) ? "" : ", кв. " + Apartment;
                return fulladdress; 
            }
            set { FullAddress = value; }
        }
        public string REGISTRAT { get; set; }
        public string MIN_CODE { get; set; }
        public string TYPEPRIV { get; set; }
        public string NUMEMPL { get; set; }

       [Display(Name = "Проіндексовано")]
        public bool  REG_OWN { get; set; }
        public string FORMVIP { get; set; }
        public bool Checked { get; set; }

        [Required(ErrorMessage = "Обов'язкове поле")]
        [Display(Name = "Кількість акцій")]
        public int StockQuantity { get; set; }

        [Required(ErrorMessage = "Обов'язкове поле")]
        [Display(Name = "Номінльна ціна")]
        public double RatedCost { get; set; }

        [Required(ErrorMessage = "Обов'язкове поле")]
        [Display(Name = "Початкова ціна")]
        public double BeginCost { get; set; }
 
    }
    public class VATListModel
    {
        [UIHint("AuctionNumber")]
        public string aucNum { get; set; }
        public   List<VATModel> list { get; set; }
    }
}